1. Field of the Invention
The present invention relates to a communication apparatus, a processing method thereof, a non-transitory computer-readable storage medium and a communication system.
2. Description of the Related Art
Wireless communication typified by a wireless LAN compliant with the IEEE 802.11 standard series is known in the art. In such wireless communication, there are a large number of settings that must be made before communication is carried out. For example, at the time of communication, communication parameters such as an SSID (Service Set Identifier), which is used as a network identifier, an encryption method, an encryption key, an authentication method and an authentication key are required to be set as setting items. Manually inputting all of these settings is a very complicated operation for the user.
In order to deal with such a complicated operation, WPS (Wi-Fi Protected Service) has been standardized as an industrial-standard automatic setting method for setting communication parameters in simple fashion. An example of automatic setting of communication parameters by WPS has been disclosed in “Wi-Fi CERTIFIED™ for Wi-Fi Protected Setup: Easing the User Experience for Home and Small Office Wi-Fi Networks”.
In the above-mentioned technology, an access point (base station) or any apparatus that is capable of communicating with an access point serves as an apparatus that is a provider of communication parameters (such an apparatus will be referred to as a “providing apparatus” below). An apparatus on the receiving side of communication parameters (this apparatus will be referred to as a “receiving apparatus” below) is connected to the access point temporarily and receives communication parameters from the providing apparatus. According to WPS, the providing apparatus and the receiving apparatus are referred to as a “registrar” and an “enrollee”, respectively.
A method employing terminal identification information [for example, information referred to as a PIN (Personal Identification Number)] for identifying an apparatus is known as one WPS method. According to this method, terminal identification information generated by an enrollee is registered with a registrar. In this way the sending and receiving and setting of settings information that enables communication in accordance with the above-mentioned standard are carried out automatically and a connection between both apparatuses is established. In relation to this technology, a technique concerning the registration of terminal identification information when wireless LAN settings are performed has been disclosed in the specification of Japanese Patent Laid-Open No. 2008-219457.
With regard to the above-mentioned terminal identification information (PIN code), there are two cases, namely a case where the information is assigned to an apparatus intrinsically and a case where the information is generated whenever communication-parameter setting processing is executed. In particular, in a case where an apparatus has not been provided with a rich user interface, often terminal identification information is assigned fixedly and this fixed terminal identification information is affixed to the surface of an apparatus as by a seal or the like.
When there are multiple providing apparatuses in a case where communication parameters are set by a method using the above-mentioned terminal identification information, the receiving apparatus must try to connect to each of these multiple providing apparatuses.
In processing for setting communication parameters, generally the receiving apparatus searches for a providing apparatus after the receiving apparatus generates the terminal identification information. At such time the receiving apparatus will try to connect itself even to a providing apparatus in which terminal identification information that is clearly different from that of the receiving apparatus has been set.